<?php

use Illuminate\Database\Migrations\Migration;

class CreateNhomdangkiTable extends Migration
{
    /**
    * Run the migrations.
    *
    * @return void
    */
    public function up()
    {
        Schema::create('nhom_dang_ki', function($table)
        {
            $table->engine='InnoDB';
            $table->increments('id')->unsigned();
            $table->integer('id_sinh_vien')->unsigned();
            $table->integer('id_de_tai')->unsigned();
            $table->string('ms_nhom', 10)->unique();
            $table->datetime('tg_dang_ki');
            $table->datetime('tg_duyet')->nullable()->default(null);
            $table->datetime('tg_xin_bao_luu')->nullable()->default(null);
            $table->integer('trang_thai_th')->unsigned();
        });
    }

    /**
    * reverse the migrations.
    *
    * @return void
    */
    public function down()
    {
        Schema::drop('nhom_dang_ki');
    }
}